<?php
/**
 * Created by PhpStorm.
 * User: yuguozhen
 * Date: 16/7/29
 * Time: 下午5:44
 */
namespace models\Timer\Count;

class NursePushClassModel extends \models\NursePushClassModel{
    //每日新增推送课程
    public function NURSE_PUSH_CLASS($prev_start,$prev_end){
        $count = $this->where('valid_flag','=','ENABLE')
            ->where('create_date','>=',$prev_start)
            ->where('create_date','<=',$prev_end)
            ->count();

        $sql = "select count(1) from `nurse_push_class` where valid_flag = 'ENABLE' and create_date >= ".$prev_start." and create_date > ".$prev_end;
//        $errpath = $this->config->logs->exec_timer_static_sql;
//        $this->monolog('exec_sql_static',$errpath,$level=\Monolog\Logger::INFO,$content=$sql,$slevel='info');

        return $count;
    }
}